package test.nacos

import com.alibaba.nacos.api.NacosFactory
import org.junit.jupiter.api.Test
import java.util.*

class NacosTest {

    @Test
    fun `test`() {
        val serverAddr = "http://localhost:8848"
        val properties = Properties()
        properties["serverAddr"] = serverAddr
        val configService = NacosFactory.createConfigService(properties)
        val dataId = "nacos.cfg.dataId"
        val group = "test"
        val content = configService.getConfig(dataId, group, 5000)
        println("content = $content")
    }
}